using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using DiceRoller.Data;

namespace DiceRoller.GUI {
  class OutputBox : System.Windows.Forms.TextBox{

    public OutputBox()
      : base() {
      Initialize();
    }

    public OutputBox(List<BusinessRule> businessRules)
      : base() {
      this.businessRules = businessRules;
      Initialize();
    }

    private void Initialize() {
      _hasHistory = false;
      base.ReadOnly = true;
      base.BackColor = System.Drawing.SystemColors.Control;
    }


    //public new bool ReadOnly {
    //  get {
    //    return base.ReadOnly;
    //  }
    //  set { }
    //}

    //public new Color BackColor {
    //  get {
    //    return base.BackColor;
    //  }
    //  set {  }
    //}

    public new string Text {
      get {
        return base.Text;
      }
      set { base.Text = value; }
    }
    
    private bool _hasHistory;
    public bool HasHistory {
      get {
        return _hasHistory;
      }
      set {
        _hasHistory = value;
      }
    }

    public void ExecuteRules() {
      foreach(BusinessRule br in businessRules) {
        br.Execute();
      }      
    }

    private List<BusinessRule> businessRules;
    public List<BusinessRule> BusinessRules {
      get {
        return businessRules;
      }
    }

  }
}